package com.hitqz.robot.driver.util;

import cn.hutool.core.util.StrUtil;
import com.hitqz.robot.driver.communication.TcpClient;

public class TasLan464Toolkit {
    //TAS_LAN_464_IP
    public static String tasLan464Ip = "";
    //TAS_LAN_464_COM1_PORT
    public static Integer tasLan464Com1Port = 10001;
    //TAS_LAN_464_COM1_NAME
    public static String tasLan464Com1Name = "com1";
    //TAS_LAN_464_COM1_MESSAGE_TEXT
    public static String tasLan464Com1MessageText = "";
    //TAS_LAN_464_COM2_PORT
    public static Integer tasLan464Com2Port = 10002;
    //TAS_LAN_464_COM2_NAME
    public static String tasLan464Com2Name = "com2";
    //TAS_LAN_464_COM2_MESSAGE_TEXT
    public static String tasLan464Com2MessageText = "";
    //TAS_LAN_464_COM3_PORT
    public static Integer tasLan464Com3Port = 10003;
    //TAS_LAN_464_COM3_NAME
    public static String tasLan464Com3Name = "com3";
    //TAS_LAN_464_COM3_MESSAGE_TEXT
    public static String tasLan464Com3MessageText = "";
    //TAS_LAN_464_COM4_PORT
    public static Integer tasLan464Com4Port = 10004;
    //TAS_LAN_464_COM4_NAME
    public static String tasLan464Com4Name = "com4";
    //TAS_LAN_464_COM4_MESSAGE_TEXT
    public static String tasLan464Com4MessageText = "";

    public static TcpClient com1TcpClient;

    public static TcpClient com2TcpClient;

    public static TcpClient com3TcpClient;

    public static TcpClient com4TcpClient;


    public static void query(){
        if (com1TcpClient!=null){
            com1TcpClient.sendHexString(tasLan464Com1MessageText);
        }
        if (com2TcpClient!=null){
            com2TcpClient.sendHexString(tasLan464Com2MessageText);
        }
        if (com3TcpClient!=null){
            com3TcpClient.sendHexString(tasLan464Com3MessageText);
        }
        if (com4TcpClient!=null){
            com4TcpClient.sendHexString(tasLan464Com4MessageText);
        }
    }

}
